#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<assert.h>
typedef int DataType;
typedef struct SLNode
{
	struct SLNode* next;
	DataType a;
}SLNode;
void PushBackSL(SLNode** head,DataType x)
{
	assert(head);
	SLNode* new = (SLNode*)malloc(sizeof(SLNode));
	new->a = x;
	new->next = NULL;
	if (*head == NULL)
	{
		*head = new;
	}
	else
	{
		SLNode* p = *head;
		while (p->next)
		{
			p = p->next;
		}
		p->next = new;
	}
}
int SLsize(SLNode* head)
{
	assert(head);
	int x = 0;
	while (head)
	{
		x++;
		head = head->next;
	}
	return x;
}
int main()
{
	SLNode* head = NULL;
	int size = 0;
	int x = 0;
	scanf("%d", &x);
	while (1)
	{
		int n = 0;
		scanf("%d", &n);
		if (n == 0)
			break;
		PushBackSL(&head, n);
	}
	size = SLsize(head);
	
	x = size - x;
	if (x<0)
	{
		printf("Not Found");
	}
	else
	{
		while (x > 0)
		{
			head = head->next;
			x--;
		}
		printf("%d", head->a);
	}
}